{#**
*
* 功能描述（结算模板）
*
* @author suoya <jlusuoya@gmail.com>
* @version 1
*#}

{#include file="header.tpl" title="结算" menuIdx=2 headImg="index" curJs="shopping_flow" #}
{#include file="define.tpl" scope=parent#}
<div class="block box">
    <div id="ur_here">
        当前位置: <a href="#">首页</a> <code>&gt;</code> 购物流程 </div>
</div>
<div class="block">
    <form action="index.php?action=order.create" method="post" name="theForm" id="theForm" onsubmit="return checkOrderForm(this)">
        <script type="text/javascript">
            var flow_no_payment = "您必须选定一个支付方式。";
            var flow_no_shipping = "您必须选定一个配送方式。";
            var flow_no_card_birthday = "请选择您要的巧克力牌。";
            var flow_no_card_message = "请输入祝福卡贺语。";
        </script>
        <script type="text/javascript">
            $(document).ready(function() {
                $("body").click(function() {
                    $(".v_option").hide();
                });
            });
            var ck_jf_msg = ''; //请检查积分';
            var ck_dj_msg = ''; //请检查代金券';
            var cur_order_amount = {#$amount#};
            var cur_jf_amount = 0;
            var cur_dj_amount = 0;
            var c_score = {#$c_score#};

            //订单金额减少
            function order_amount_update()
            {
                var ret = false;
                var val = cur_order_amount - cur_jf_amount - cur_dj_amount;
                if (val < 0)
                {
                    val = 0;
                    ret = true;
                }
                $("#pay_amount").text(val);
                if ((cur_jf_amount + cur_dj_amount) != 0)
                    $("#add_score").text(0);
                else
                    $("#add_score").text(c_score);
                return ret;
            }

            function clean_jf()
            {
                $("#ECS_INTEGRAL").val(0);
                cur_jf_amount = 0;
                ck_jf_msg = '';
                order_amount_update();
            }

            function change_dj(obj)
            {
                if ($(obj).val() == '')
                {
                    cur_dj_amount = 0;
                    ck_dj_msg = '';
                    order_amount_update();
                }
                else
                    ck_dj_msg = '请使用代金券以更新付款金额';
            }
            //积分规则客户端模拟
            function change_jf(obj)
            {
                var cur_jf = $(obj).val();
                if (cur_jf % 10 != 0 || parseInt(cur_jf) != cur_jf)
                {
                    alert('请输入正确的积分');
                    ck_jf_msg = '积分非法';
                    return;
                }
                all_jf = {#$user_acc['score']#};
                if (cur_jf > all_jf)
                {
                    alert('您只有' + all_jf + '积分可用');
                    $(obj).val(0);
                    return;
                }
                max_unit = parseInt((cur_order_amount - cur_dj_amount) / 100);
                if (max_unit * 100 < cur_jf * 10)
                {
                    if (confirm(cur_jf + '可以抵扣' + cur_jf * 10 + '元, 订单金额只有' + cur_order_amount + ', 是否修改为使用' + max_unit * 10 + '积分？'))
                        cur_jf = max_unit * 10;
                    $(obj).val(cur_jf);
                }
                if (cur_jf == 0)
                {
                    clean_jf();
                    return;
                }
                if (!confirm('积分在下单之后扣除，一但使用无论订单是否完成都无法返还，继续使用？'))
                    $(obj).val(0);
                cur_jf_amount = cur_jf * 10;
                order_amount_update();
                ck_jf_msg = '';
            }
        </script>
        <div class="flowstep_3"></div>

        <h5 class="user_order_title cart_flow"><span>商品列表</span>
            <a href="index.php?action=cart.index" class="f7">修改及添加商品</a>        </h5>
        <table width="932px" align="center" border="0" cellpadding="5" cellspacing="0" style=" margin-left: 31px;">
            <tbody>
                {#foreach $cartlist as $item#}
                    <tr>
                        <td bgcolor="#ffffff" align="left">
                            <a href="index.php?action=food.detail&id={#$item['id']#}&version={#$item['version']#}" target="_blank"><img src="data/cake/cake_{#$item['id']#}.jpg" width="50" height="50"></a>
                        </td>
                        <td bgcolor="#ffffff" align="left">
                            {#if $item['status'] != 0 #}
                                <strong style="color:#ff0000">{#$food_notice[$item['status']]#}</strong><br/>
                            {#/if#}
                            <span class="f8">商品名称：</span>
                            <a href="index.php?action=food.detail&id={#$item['id']#}&version={#$item['version']#}" target="_blank" class="f6" align="center">{#$item['name']#}</a>
                        </td>
                        <td bgcolor="#ffffff" align="left"></td>
                        <td bgcolor="#ffffff" align="left"><span class="f8">单价：</span>￥{#$item['price']#}元</td>
                        <td bgcolor="#ffffff" align="left"><span class="f8">折扣：</span>{#$item['discount']*10#}</td>
                        <td bgcolor="#ffffff" align="left"><span class="f8">数量：</span>{#$item['cnt']#}</td>
                        <td bgcolor="#ffffff" align="left"><span class="f8">小计：</span>￥{#round($item['price']*$item['discount']*$item['cnt'], 2)#}元</td>
                    </tr>
                {#/foreach#}
            </tbody></table>

        <script type="text/javascript">
            $(function() {
                $('.rao_srp').click(function() {
                    var birname = $(this).attr('value');
                    var rel = $(this).attr('rel');
                    if (rel == '1') {
                        document.getElementById('card_birthday_value').setAttribute('disabled', true);
                        $('#card_birthday_value').val('');
                    } else {
                        $('#card_birthday_value').removeAttr('disabled');
                    }
                    $('input[name=card_birthday]').val(birname);
                });
                $('.rao_srp_other').focusout(function() {
                    $('input[name=card_birthday]').val($(this).val());
                });
                $('.rao_hk').click(function() {
                    var str = $(this).val();
                    var rel = $(this).attr('rel');
                    if (str == rel) {
                        $(this).val('');
                    }
                });
                $('.cart_flow_radio_title span').click(function() {
                    var display = $(this).parents('.cart_flow_radio').find('.cart_flow_main').css('display');
                    if (display == 'none') {
                        $(this).addClass('curl');
                        $(this).parents('.cart_flow_radio').find('.cart_flow_main').show();
                    } else {
                        $(this).removeClass('curl');
                        $(this).parents('.cart_flow_radio').find('.cart_flow_main').hide();
                    }
                    $(this).parents('.cart_flow_radio').find('.must').val($(this).parents('.cart_flow_radio').find('.cart_flow_main').css('display'));
                    //配送方式
                    var paymethod = $(this).attr('rel');
                    if (paymethod == 'paymethod') {
                        $(this).parents('.cart_flow_radio').find('input[name=shipping]').click();
                        $('.paymethod').parents('.cart_flow_radio').find('.cart_flow_main').hide();
                        $('.paymethod').removeClass('curl');
                        $(this).parents('.cart_flow_radio').find('.cart_flow_main').show();
                        $(this).addClass('curl');
                    }
                    //开发票
                    if (paymethod == 'check_needinv') {
                        if (display == 'none') {
                            //打开							
                            $('#ECS_NEEDINV').attr('checked', 'checked');
                        } else {
                            $('#ECS_NEEDINV').removeAttr('checked');
                        }
                        //$('input[name=need_inv]').click();
                        changeNeedInv();
                    }
                })
            })
        </script>

        <script type="text/javascript">

            $(document).ready(function() {
                $(".option1").find('span').click(function() {

                    if (!$(this).hasClass('cur'))
                    {
                        var rel = $(this).attr('rel');
                        $(this).siblings('input').attr('value', rel);
                        $(this).addClass('cur');
                        $(this).siblings('span').removeClass('cur');

                        if (rel == 1)
                        {
                            $(".option1").siblings('.options_content').show();
                        }
                        else {
                            $(".option1").siblings('.options_content').hide();
                        }
                    }
                });

                $(".option2").find('span').click(function() {
                    if (!$(this).hasClass('cur'))
                    {
                        $(this).addClass('cur');
                        $(this).siblings('span').removeClass('cur');

                        var rel = $(this).attr('rel');

                        $(this).siblings('input').attr('value', rel);

                        if (rel == 0)//不需要
                        {
                            $(".rao_srp").attr('disabled', true);
                            $(".rao_srp").attr('checked', false);
                            $('input[name=card_birthday]').val('');
                            $("#card_birthday_value").attr('value', '');
                            $("#card_birthday_value").attr('disabled', true);

                            $(".option2").siblings('.options_content').hide();
                        }
                        else {
                            $(".rao_srp").attr('disabled', false);

                            $(".rao_srp").first().attr('checked', true);

                            $("#card_birthday").attr('value', '生日快乐')

                            $(".option2").siblings('.options_content').show();
                        }
                    }
                });

                $(".option3").find('span').click(function() {
                    if (!$(this).hasClass('cur'))
                    {
                        var rel = $(this).attr('rel');

                        $(this).siblings('input').attr('value', rel);
                        $(this).addClass('cur');
                        $(this).siblings('span').removeClass('cur');

                        if (rel == 0)//不需要
                        {
                            $("#card_message").attr('disabled', true);

                            $(".option3").siblings('.options_content').hide();
                        }
                        else {
                            $("#card_message").attr('disabled', false);

                            $(".option3").siblings('.options_content').show();
                        }
                        //$("#card_message").attr('value','');
                    }
                });

                $(".option4").find('span').click(function() {

                    if (!$(this).hasClass('cur'))
                    {
                        var rel = $(this).attr('rel');
                        $(this).siblings('input').attr('value', rel);
                        $(this).addClass('cur');
                        $(this).siblings('span').removeClass('cur');

                        if (rel == 1)
                        {
                            $(".option4").siblings('.options_content').show();
                        }
                        else {
                            $(".option4").siblings('.options_content').hide();
                        }
                    }
                });
            });

        </script>

        <div class="cart_flow_option" style="margin-top:10px;">
            <div class="option_title f8">巧克力牌（免费）</div>
            <div class="options option2 f8">
                <span class="cur" rel="0">不需要</span>
                <span rel="1">需要</span>
                <input type="hidden" name="need_card_birthday" id="need_card_birthday" value="0">
            </div>
            <div class="options_content" style="display:none;">
                <input disabled="disabled" type="radio" name="birthday_card" class="rao_srp" value="生日快乐" rel="1">生日快乐
                <input disabled="disabled" type="radio" name="birthday_card" class="rao_srp l_150" rel="1" value="Happy Birthday">Happy Birthday
                <input disabled="disabled" type="radio" name="birthday_card" class="rao_srp l_150" rel="0" value="">其他
                <input type="text" name="card_birthday_value" class="inputBg1 rao_srp_other" id="card_birthday_value" maxlength="10" value="" disabled="disabled"><span id="card_birthday_tip" class="f9"> （ 不超过10个字 ）</span>
                <input type="hidden" value="" name="card_birthday" id="card_birthday">
            </div>							
        </div>		

        <div class="cart_flow_option" style="margin-top:10px;">
            <div class="option_title f8">祝福贺卡（免费）</div>
            <div class="options option3 f8">
                <span class="cur" rel="0">不需要</span>
                <span rel="1">需要</span>
                <input type="hidden" name="need_card" id="need_card" value="0">
            </div>
            <div class="options_content" style="display:none;">
                <textarea disabled="disabled" name="card_message" id="card_message" class="rao_hk" rel="写下您的祝福语">写下您的祝福语</textarea>（  150个字以内 ）				
            </div>
        </div>

        <div class="cart_flow_option" style="margin-top:10px;">
            <div class="option_title f8">产品图册（免费）</div>
            <div class="options option4 f8">
                <span class="cur" rel="0">不需要</span>
                <span rel="1">需要</span>
                <input type="hidden" name="need_album" id="need_album" value="0">
            </div>
            <div class="options_content" style="display:none;">
                <table border="0" bgcolor="#ffffff" width="100%" style="background-color:#fffeea;line-height:30px;">
                    <tbody>
                        <tr>
                            <td align="left" width="130">
                                <a target="_blank" href="images/album_b.jpg"><img width="50" border="0" title="产品图册" src="images/album_s.jpg"></a>
                            </td>
                            <td align="left">精心制作的产品图册，赏心悦目。</td>
                        </tr>		
                    </tbody>
                </table>
            </div> 				
        </div>		

        <div class="cart_flow_option" style="margin-top:10px;">
            <div class="option_title f8">生日蜡烛（免费）</div>
            <div class="options option1 f8">
                <span rel="0">不需要</span>
                <span class="cur" rel="1">需要</span>
                <input type="hidden" name="need_candle" id="need_candle" value="1">
            </div>
            <div class="options_content">
                <table border="0" bgcolor="#ffffff" width="100%" style="background-color:#fffeea;line-height:30px;">
                    <tbody>
                        <tr>
                            <td align="left" width="130">
                                <a target="_blank" href="images/candle_b.jpg"><img width="50" border="0" title="生日蜡烛 kids candles" src="images/candle_s.jpg"></a>
                            </td>
                            <td align="left">生日蜡烛(10只/盒)  一个蛋糕可免费赠送一盒蜡烛</td>
                        </tr>		
                    </tbody>
                </table>
            </div> 				
        </div>		
        <div style="display:none" id="true_addr_info">
            <input type="text" name="true_area" id="true_area" value="" />
            <input type="text" name="true_address" id="true_address" value="" />
            <input type="text" name="true_consignee" id="true_consignee" value="" />
            <input type="text" name="true_mobile_to" id="true_mobile_to" value="" />
            <input type="text" name="true_mobile_from" id="true_mobile_from" value="" />
            <input type="text" name="true_sign_building" id="true_sign_building" value="" />
            <input type="text" name="true_zipcode" id="true_zipcode" value="0" />
            <input type="text" name="true_delivery_time" id="true_delivery_time" value="" />
            <input type="text" name="true_delivery_type" id="true_delivery_type" value="1" />
        </div>
        <div class="rao_shrchange" id="dis_add_info">
            <h5 class="user_order_title cart_flow"><span>配送地址</span></h5>	
            <div class="cart_flow_radio">
                <div class="cart_flow_radio_title f8">
                    <span class="paymethod curl" rel="paymethod">送货上门</span>
                    <div style="display:none;"> 
                        <input type="radio" onclick="selectShipping(this)" insure="0" supportcod="1" checked="true" value="4" name="shipping">
                    </div>
                </div>
                <script type="text/javascript">
                    function checkRegion(region_id)
                    {
                        if (region_id == 72)
                        {
                            $("#district_tip").html('龙岗区目前只开通15：00-21：00的配送时段，其他时段不配送。').show();
                        }
                        else if (region_id == 89)
                        {
                            $("#district_tip").html('盐田区周六、周日不派送。').show();
                        }
                        else {
                            $("#district_tip").hide();
                        }
                    }
                    $(document).ready(function() {
                        document.forms['theForm'].reset();
                        $("#bdate_0").blur();
                        region.loadFirstRegions(0, 0, 'selProvince_00');
                        $("#selProvince_00").val(19);
                        $("#selProvince_00").change();
                    });
                </script>
                <div class="cart_flow_main no_bg" style="display:block;">
                    <input name="check_paymethod" value="0" type="hidden">
                    <script type="text/javascript" src="js/region.js"></script>
                    <script language="javascript" type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script>
                    <script type="text/javascript">
                        region.isAdmin = false;
                        var consignee_not_null = "收货人姓名不能为空！";
                        var country_not_null = "请您选择收货人所在省份！";
                        var province_not_null = "请您选择收货人所在城市！";
                        var city_not_null = "请您选择收货人所在区域！";
                        var district_not_null = "请您选择收货人所在区域！";
                        var invalid_email = "您输入的邮件地址不是一个合法的邮件地址。";
                        var address_not_null = "收货人的详细地址不能为空！";
                        var tele_not_null = "电话不能为空！";
                        var mobile_not_null = "订货人手机不能为空！";
                        var shipping_not_null = "请您选择配送方式！";
                        var payment_not_null = "请您选择支付方式！";
                        var goodsattr_style = "1";
                        var tele_invaild = "收货人手机号码输入有误。";
                        var zip_not_num = "邮政编码只能填写数字";
                        var mobile_invaild = "订货人手机号码输入有误。";
                        var best_shipping_time_required = "请选择最佳送货日期和时间。";
                    </script>
                    {#foreach $userAddress as $k => $item#}
                        <div class="cart_add">
                            <input name="consignee_add" value="{#$item['id']#}" type="radio" class="rao_paymethod_change"{#if $k ==0#}checked="checked"{#/if#}>
                            {#$item['consignee']#} {#$item['mobile_to']#}
                            <script>
                                var area_{#$item['id']#} = region.GetAddress({#$item['province']#}, {#$item['city']#}, {#$item['district']#}, {#$item['area']#});
                                var addr_{#$item['id']#} = "{#$item['address']#}"
                                var consignee_{#$item['id']#} = "{#$item['consignee']#}";
                                var mobile_to_{#$item['id']#} = "{#$item['mobile_to']#}";
                                var mobile_from_{#$item['id']#} = "{#$item['mobile_from']#}";
                                document.write(area_{#$item['id']#} + addr_{#$item['id']#});
                            </script><span class="rao_flow_del" rel="{#$item['id']#}"></span>
                        </div>
                    {#/foreach#}
                    {#$no_add=count($userAddress) == 0#}
                    <div class="cart_add">
                        <input name="consignee_add" value="0" type="radio" class="rao_paymethod_change"{#if $no_add#}checked="checked"{#/if#}> 使用其他收货地址
                        <div class="cart_flow_change" style="display:{#if $no_add#}block{#else#}none{#/if#};">
                            <table width="100%" align="center" border="0" cellpadding="5" cellspacing="1">
                                <tbody><tr>
                                        <td class="dc_cart_tr">收货地址:</td>
                                        <td colspan="3">
                                            <select name="province" id="selProvince_00" onchange="region.changed(this, 1, 'selCity_00')">
                                                <option value="0">请选择</option>
                                                <option value="1">省份1</option>
                                                <option value="2">省份2</option>
                                            </select>
                                            <select name="city" id="selCity_00" onchange="region.changed(this, 2, 'selDistricts_00')">
                                                <option value="0">请选择市</option>
                                            </select>
                                            <select name="district" id="selDistricts_00" onchange="region.changed(this, 3, 'selArea_00');
                                                    checkRegion(this.value);" style="border:1px solid #ccc;">
                                                <option value="0">请选择区</option>
                                            </select>
                                            <select name="area" id="selArea_00" style="display:none">
                                                <option value="0">请选择区域</option>
                                            </select>
                                            <input type="text" value="" id="address_3" class="inputBg1" name="address" maxlength="80"> (必填，限80字)
                                            <span style="color:#F0592A;font-weight:bold;display:none;" id="district_tip"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="dc_cart_tr">收货人姓名:</td>
                                        <td><input type="text" value="" id="consignee_3" class="inputBg1" name="consignee" maxlength="20">(必填)</td>
                                    </tr>
                                    <tr>
                                        <td class="dc_cart_tr">收货人手机:</td><td><input type="text" value="{#$mobile#}" id="tel_3" class="inputBg1" name="tel" maxlength="20">(必填)</td>
                                        <td class="dc_cart_tr"></td><td class="f9">* 提示：21点之后下单，最早送货时间为第二天14点</td>
                                    </tr>
                                    <tr>
                                        <td class="dc_cart_tr">您的手机:</td>
                                        <td><input type="text" value="{#$mobile#}" id="mobile_3" class="inputBg1" name="mobile" maxlength="20">(必填)</td>
                                        <td class="dc_cart_tr"></td>
                                        <td>
                                            <input type="hidden" value="" name="address_id">
                                            <input type="hidden" value="" name="address_id_back">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="dc_cart_tr">标志性建筑:</td><td><input type="text" value="" id="sign_building_3" class="inputBg1" name="sign_building" maxlength="200"></td>
                                        <td class="dc_cart_tr"></td><td class="f9">&nbsp;</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div style="display:none;"> 
                        <input type="radio" id="ECS_NEEDINSURE" name="ECS_NEEDINSURE" disabled="">
                    </div>
                </div>
            </div>
            <div class="cart_flow_radio">
                <div class="cart_flow_radio_title f8">
                    <span class="paymethod" rel="paymethod">上门取货</span>
                    <div style="display:none;"> 
                        <input type="radio" onclick="selectShipping(this)" insure="0" supportcod="1" value="9" name="shipping">
                    </div>
                </div>
                <div class="cart_flow_main">
                    <table width="100%" cellspacing="1" cellpadding="5" border="0" align="center">
                        <tbody>
                            <tr>
                                <td class="dc_cart_tr">取货地址:</td>
                                <td colspan="3">
                                    <script>
                                        var area_come = "{#$area_come#}";
                                        var addr_come = "{#$addr_come#}";
                                        document.write(area_come + addr_come);
                                    </script>
                                </td>
                            </tr>
                            <tr>
                                <td class="dc_cart_tr">取货人姓名:</td>
                                <td>
                                    <input type="text" value="" class="inputBg1" id="consignee_come" name="rao_consignee" maxlength="20"> (必填)
                                </td>
                            </tr>
                            <tr>
                                <td class="dc_cart_tr">取货人手机:</td>
                                <td>
                                    <input type="text" value="" class="inputBg1" id="tel_come" name="rao_tel" maxlength="20"> (必填) 
                                </td>
                                <td class="dc_cart_tr">&nbsp;</td>
                                <td class="f9">
                                    提示：21点之后下单，最早取货时间为第二天14点
                                </td>
                            </tr>
                            <tr>
                                <td class="dc_cart_tr">您的手机:</td>
                                <td>
                                    <input type="text" value="{#$mobile#}" class="inputBg1" id="mobile_come" name="rao_mobile" maxlength="20"> (必填) 
                                </td>
                                <td class="dc_cart_tr">&nbsp;</td>
                                <td class="f9">
                                </td>
                            </tr>			
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="rao_shrchange">
            <h5 class="user_order_title cart_flow"><span>配送/取货时间</span></h5>	
            <div class="cart_flow_radio" style="padding-top: 10px;">
                最佳送/取货时间  <input id="dely_date" name="dely_date" type="text" readonly="true" value="" class="inputBg" onclick="WdatePicker({minDate: '{#$cur_date#}'})"/>
                <select id="dely_time" name="dely_time">{#include file="timeslot.tpl"#}</select>
            </div>
        </div>
        <h5 class="user_order_title cart_flow"><span>支付方式(余额{#$user_acc['money']#}, 可用积分{#$user_acc['score']#})</span></h5>
        <table width="932px" align="center" border="0" cellpadding="8" cellspacing="1" id="paymentTable" style="margin-left:31px;">
            <tbody><tr>
                    {#foreach $p_type as $k=>$item#}
                        <td valign="top" align="left">
                            {#if $k <= $u_type*10#}
                                <input class="payment" pay_code="balance" type="radio" name="payment" value="{#$k#}" {#if $k == 3#}checked=true{#/if#} iscod="0" onclick="selectPayment(this)"><span>{#$item#}</span>
                                {#else#}
                                <input class="payment" pay_code="balance" type="radio" name="payment" value="0" disabled=true iscod="0">{#$item#}
                            {#/if#}
                        </td>
                    {#/foreach#}
                </tr>
            </tbody></table>		

        <div class="cart_flow_main" style="display:block;margin-left:31px;margin-right:34px;">
            <table width="100%" align="center" border="0" cellpadding="5" cellspacing="1">

                <tbody><tr>
                        <td width="70" class="f8">代金券:</td>
                        <td width="70">
                            <input name="card_pwd" type="text" class="inputBg1" id="ECS_UCARD_PWD" value="" onchange="change_dj(this)" size="10" maxlength="27">
                        </td>
                        <td width="70">
                            <input type="button" onclick="changeUcard()" class="button_nomarl" value="使用" />
                        </td>
                        <td><span id="ECS_UCARD_NOTICE">（请刮开代金券背面涂层部分并输入防伪编码，不区分大小写）</span></td>
                    </tr>

                    <tr>
                        <td class="f8" width="70">使用积分:</td>
                        <td width="70">
                            <input name="integral" type="text" class="inputBg1" id="ECS_INTEGRAL" value="0" size="10" onchange="change_jf(this)">
                        </td>
                        <td width="70">
                        </td>			  
                        <td>
                            <span id="ECS_INTEGRAL_NOTICE" style="color:red;" class="notice"></span>
                            <span>（积分必须是10的整体倍，每10分抵扣100元，如果需要使用代金券，请在使用代金券之后输入积分）</span>
                        </td>
                    </tr>

                </tbody></table>
        </div>
        <div class="rao_pos" style="position: relative;z-index: 100;overflow:visible;height:360px;">
            <h5 class="user_order_title cart_flow"><span>费用总计</span></h5>
            <div class="cart_flow_radio">
                <div class="cart_flow_radio_title f8"><span rel="check_needinv">开发票：</span></div>
                <div class="cart_flow_main">
                    <div style="display:none;">
                        <input name="need_inv" type="checkbox" class="input" id="ECS_NEEDINV" value="0" onclick="changeNeedInv();">
                    </div>
                    <span class="f8" style="display:none;">发票类型:</span>
                    <select name="inv_type" id="ECS_INVTYPE" disabled="true" onchange="changeNeedInv()" style="display:none;">
                        <option value="普通打印发票">普通打印发票 [0%]</option>				</select>
                    <span class="f8">发票抬头:</span>
                    <input name="inv_payee" type="text" class="inputBg1" id="ECS_INVPAYEE" size="20" disabled="true" value="请填写公司名称或者个人真实姓名" onfocus="javascript:if (this.value == '请填写公司名称或者个人真实姓名') {
                                this.value = ''
                            }
                            ;" maxlength="200">
                    <span class="f8">发票内容:</span>
                    <select name="inv_content" id="ECS_INVCONTENT" disabled="true" onchange="changeNeedInv()" style="border:1px solid #ccc;">
                        {#foreach $inv_type as $k => $item#}<option value="{#$k#}">{#$item#}</option>{#/foreach#}
                    </select>
                </div>
            </div>
            <div class="cart_flow_radio">
                <div class="cart_flow_radio_title f8">顾客留言备注:</div>
                <div class="cart_flow_main" style="display:block;">
                    <textarea name="postscript" id="postscript" class="rao_hk_1" onkeyup="this.value = this.value.slice(0, 500)"></textarea>（限500字）
                    <br>如更改订单内容请直接拨打客服电话，留言的处理为每天一次，不具备及时性
                </div>
            </div>
            <div style="bottom:0px;position: absolute;z-index: 999; right:0px;width:250px;margin-right: 34px;"> 
                <div id="ECS_ORDERTOTAL">
                    <table width="100%" align="center" border="0" cellpadding="5" cellspacing="1">

                        <tbody>
                            <tr><td align="right">商品总价: <font class="f8">￥{#$amount#}元</font></td></tr>
                            <tr><td align="right"> 应付款金额: <font class="f8" >￥<span id='pay_amount'>{#$amount#}</span>元</font></td></tr>
                            <tr><td align="right"> 可得积分: <font class="f8" ><span id='add_score'>{#$c_score#}</span>分</font></td></tr>
                        </tbody>
                    </table>
                </div>         
                        <div align="right" style="margin:8px auto;">
                    <input type="submit" class="rao_cart_done button_nomarl" value="提交订单" />
                </div>
            </div> 
        </div>
    </form></div>

{#include file="footer.tpl"#}
